#include <stdio.h>

int main(int argc, char const *argv[])
{
    int arr[] = {1,2,3,4,5,4,3,2};
    int len = sizeof(arr)/sizeof(int);
    int arr2[2]; 

    int a;
    for(int i = 0; i < len; i++)
        a ^= arr[i];
    
    int b;
    b = a & -a;
    int c1 = 0,c2 = 0;

    for(int i = 0; i < len; i++)
    {
        if(arr[i] & b)
            c1 ^= arr[i];
        else
            c2 ^= arr[i];
    }

    arr2[0] = c1;
    arr2[1] = c2;
    printf("%d %d",c1,c2);
    return 0;
}
